package com.wt.springsamples.biz.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wt.springsamples.model.SysFunction;
import com.wt.springsamples.model.SysMenu;
import com.wt.springsamples.model.SysRole;
import com.wt.springsamples.model.SysUser;
import com.wt.springsamples.model.dto.UserLoginInfo;
import com.wt.springsamples.model.dto.UserRoleConfigDto;
import com.wt.springsamples.model.search.TimeSearchModel;

import java.util.List;
import java.util.Set;

public interface ISysUserService extends IService<SysUser> {

    SysUser selectByLoginName(String  loginName);

    <T extends TimeSearchModel> Page<SysUser> pagination(T searchModel, int pageSize, int pageIndex);

    void configRole(UserRoleConfigDto userRoleConfigDto);

    List<SysRole> getUserRoleList(long userId);

    Set<Long> getSysMenuIdListByUserId(long userId);

    List<SysMenu> getSysMenuListByUserId(long userId);

    List<SysFunction> getSysFunctionListByUserId(long userId);

    List<Long> getRoleIdsByUserId(long userId);

    UserLoginInfo getUserLoginInfoByLoginName(String loginName);
}


